home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / rbprndmo / msflexsa.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-08-03  |  11.0 KB  |  349 lines

  1. VERSION 5.00
  2. Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
  3. Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
  4. Begin VB.Form MsFlexSample 
  5.    BackColor       =   &H00FFFFFF&
  6.    Caption         =   "MsFlexSample"
  7.    ClientHeight    =   6960
  8.    ClientLeft      =   975
  9.    ClientTop       =   2025
  10.    ClientWidth     =   11865
  11.    LinkTopic       =   "Form1"
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   6960
  14.    ScaleWidth      =   11865
  15.    WindowState     =   2  'Maximized
  16.    Begin VB.CommandButton Command2 
  17.       BackColor       =   &H00FFFFFF&
  18.       Caption         =   "Close"
  19.       Height          =   345
  20.       Left            =   8445
  21.       Style           =   1  'Graphical
  22.       TabIndex        =   11
  23.       Top             =   180
  24.       Width           =   810
  25.    End
  26.    Begin MSMask.MaskEdBox MaskEd 
  27.       Height          =   315
  28.       Left            =   7425
  29.       TabIndex        =   10
  30.       Top             =   1035
  31.       Width           =   1755
  32.       _ExtentX        =   3096
  33.       _ExtentY        =   556
  34.       _Version        =   327681
  35.       BorderStyle     =   0
  36.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  37.          Name            =   "MS Sans Serif"
  38.          Size            =   9.75
  39.          Charset         =   177
  40.          Weight          =   700
  41.          Underline       =   0   'False
  42.          Italic          =   0   'False
  43.          Strikethrough   =   0   'False
  44.       EndProperty
  45.       Format          =   "dd/mm/yy"
  46.       PromptChar      =   "_"
  47.    End
  48.    Begin VB.Frame Frame1 
  49.       BackColor       =   &H00FFFFFF&
  50.       Height          =   1092
  51.       Left            =   1275
  52.       TabIndex        =   4
  53.       Tag             =   "noprint"
  54.       Top             =   4920
  55.       Width           =   6072
  56.       Begin VB.Label Label3 
  57.          BackColor       =   &H8000000E&
  58.          Caption         =   "Quantity"
  59.          BeginProperty Font 
  60.             Name            =   "MS Sans Serif"
  61.             Size            =   12
  62.             Charset         =   177
  63.             Weight          =   700
  64.             Underline       =   0   'False
  65.             Italic          =   0   'False
  66.             Strikethrough   =   0   'False
  67.          EndProperty
  68.          ForeColor       =   &H00800080&
  69.          Height          =   360
  70.          Left            =   96
  71.          TabIndex        =   8
  72.          Top             =   444
  73.          Width           =   1308
  74.       End
  75.       Begin VB.Label Label1 
  76.          BackColor       =   &H00FFFFFF&
  77.          Caption         =   "Amount"
  78.          BeginProperty Font 
  79.             Name            =   "MS Sans Serif"
  80.             Size            =   12
  81.             Charset         =   177
  82.             Weight          =   700
  83.             Underline       =   0   'False
  84.             Italic          =   0   'False
  85.             Strikethrough   =   0   'False
  86.          EndProperty
  87.          ForeColor       =   &H000000C0&
  88.          Height          =   396
  89.          Left            =   3036
  90.          TabIndex        =   7
  91.          Top             =   468
  92.          Width           =   1008
  93.       End
  94.       Begin VB.Label Label2 
  95.          Alignment       =   2  'Center
  96.          BackColor       =   &H00FF0000&
  97.          Caption         =   "$ 0.00"
  98.          BeginProperty Font 
  99.             Name            =   "MS Sans Serif"
  100.             Size            =   12
  101.             Charset         =   177
  102.             Weight          =   700
  103.             Underline       =   -1  'True
  104.             Italic          =   0   'False
  105.             Strikethrough   =   0   'False
  106.          EndProperty
  107.          ForeColor       =   &H00FFFFFF&
  108.          Height          =   372
  109.          Left            =   4104
  110.          TabIndex        =   6
  111.          Top             =   468
  112.          Width           =   1332
  113.       End
  114.       Begin VB.Label Label4 
  115.          Alignment       =   2  'Center
  116.          Appearance      =   0  'Flat
  117.          BackColor       =   &H80000005&
  118.          BorderStyle     =   1  'Fixed Single
  119.          Caption         =   "6"
  120.          BeginProperty Font 
  121.             Name            =   "MS Sans Serif"
  122.             Size            =   12
  123.             Charset         =   177
  124.             Weight          =   700
  125.             Underline       =   0   'False
  126.             Italic          =   0   'False
  127.             Strikethrough   =   0   'False
  128.          EndProperty
  129.          ForeColor       =   &H80000008&
  130.          Height          =   372
  131.          Left            =   1428
  132.          TabIndex        =   5
  133.          Top             =   444
  134.          Width           =   1332
  135.       End
  136.    End
  137.    Begin VB.CommandButton Command1 
  138.       BackColor       =   &H00FFFFFF&
  139.       Caption         =   "Click to Invoice Style"
  140.       BeginProperty Font 
  141.          Name            =   "MS Sans Serif"
  142.          Size            =   9.75
  143.          Charset         =   177
  144.          Weight          =   700
  145.          Underline       =   0   'False
  146.          Italic          =   0   'False
  147.          Strikethrough   =   0   'False
  148.       EndProperty
  149.       Height          =   408
  150.       Left            =   3870
  151.       Style           =   1  'Graphical
  152.       TabIndex        =   3
  153.       Top             =   975
  154.       Width           =   3180
  155.    End
  156.    Begin VB.PictureBox Picture1 
  157.       AutoSize        =   -1  'True
  158.       Height          =   1560
  159.       Left            =   348
  160.       Picture         =   "MsFlexSample.frx":0000
  161.       ScaleHeight     =   1500
  162.       ScaleWidth      =   3075
  163.       TabIndex        =   2
  164.       Top             =   120
  165.       Width           =   3135
  166.    End
  167.    Begin MSFlexGridLib.MSFlexGrid MSFlex 
  168.       Bindings        =   "MsFlexSample.frx":0885
  169.       Height          =   2772
  170.       Left            =   552
  171.       TabIndex        =   1
  172.       Top             =   2124
  173.       Width           =   7992
  174.       _ExtentX        =   14102
  175.       _ExtentY        =   4868
  176.       _Version        =   65541
  177.       Rows            =   15
  178.       Cols            =   4
  179.       FixedCols       =   0
  180.       ForeColorFixed  =   16711680
  181.       BackColorBkg    =   16777215
  182.       WordWrap        =   -1  'True
  183.       AllowUserResizing=   3
  184.    End
  185.    Begin VB.TextBox Text1 
  186.       BeginProperty Font 
  187.          Name            =   "MS Sans Serif"
  188.          Size            =   9.75
  189.          Charset         =   177
  190.          Weight          =   700
  191.          Underline       =   0   'False
  192.          Italic          =   0   'False
  193.          Strikethrough   =   0   'False
  194.       EndProperty
  195.       Height          =   495
  196.       Left            =   210
  197.       MultiLine       =   -1  'True
  198.       TabIndex        =   0
  199.       Text            =   "MsFlexSample.frx":0895
  200.       Top             =   1596
  201.       Visible         =   0   'False
  202.       Width           =   9555
  203.    End
  204.    Begin VB.Data Data1 
  205.       Caption         =   "Data1"
  206.       Connect         =   "Access"
  207.       DatabaseName    =   "C:\myweb\Publish.mdb"
  208.       DefaultCursorType=   0  'DefaultCursor
  209.       DefaultType     =   2  'UseODBC
  210.       Exclusive       =   0   'False
  211.       Height          =   324
  212.       Left            =   4416
  213.       Options         =   0
  214.       ReadOnly        =   0   'False
  215.       RecordsetType   =   1  'Dynaset
  216.       RecordSource    =   "Customers"
  217.       Top             =   3960
  218.       Width           =   1692
  219.    End
  220.    Begin VB.Label Label5 
  221.       Alignment       =   2  'Center
  222.       BackColor       =   &H00FFFFFF&
  223.       Caption         =   "Printing MSFlexGrid with RoboPrint"
  224.       BeginProperty Font 
  225.          Name            =   "MS Sans Serif"
  226.          Size            =   13.5
  227.          Charset         =   177
  228.          Weight          =   700
  229.          Underline       =   0   'False
  230.          Italic          =   0   'False
  231.          Strikethrough   =   0   'False
  232.       EndProperty
  233.       ForeColor       =   &H000000C0&
  234.       Height          =   345
  235.       Left            =   600
  236.       TabIndex        =   9
  237.       Top             =   1755
  238.       Width           =   6810
  239.    End
  240.    Begin VB.Shape Shape2 
  241.       BackColor       =   &H000000FF&
  242.       BackStyle       =   1  'Opaque
  243.       FillStyle       =   5  'Downward Diagonal
  244.       Height          =   240
  245.       Left            =   8475
  246.       Shape           =   2  'Oval
  247.       Top             =   6030
  248.       Width           =   210
  249.    End
  250.    Begin VB.Shape Shape1 
  251.       BackColor       =   &H000000FF&
  252.       BackStyle       =   1  'Opaque
  253.       FillStyle       =   4  'Upward Diagonal
  254.       Height          =   270
  255.       Left            =   720
  256.       Shape           =   2  'Oval
  257.       Top             =   6030
  258.       Width           =   210
  259.    End
  260.    Begin VB.Line Line1 
  261.       BorderWidth     =   3
  262.       X1              =   1035
  263.       X2              =   8250
  264.       Y1              =   6150
  265.       Y2              =   6150
  266.    End
  267. Attribute VB_Name = "MsFlexSample"
  268. Attribute VB_GlobalNameSpace = False
  269. Attribute VB_Creatable = False
  270. Attribute VB_PredeclaredId = True
  271. Attribute VB_Exposed = False
  272. Private Sub Command1_Click()
  273. Static Style As Boolean
  274. Style = Not Style
  275. If Style Then
  276. Command1.Caption = "Click to Recordset Style"
  277. Invoice
  278. Frame1.Tag = ""
  279. Text1.Visible = True
  280. Label5.Visible = False
  281. Command1.Caption = "Click to Invoice Style"
  282. DTSource
  283. Frame1.Tag = "noprint"
  284. Text1.Visible = False
  285. Label5.Visible = True
  286. End If
  287. End Sub
  288. Private Sub Command2_Click()
  289. Unload Me
  290. End Sub
  291. Private Sub Form_Load()
  292. MaskEd = Format(Now, "dd/mm/yy")
  293. Data1.DatabaseName = App.Path & "\Publish.mdb"
  294. Invoice
  295. End Sub
  296. Private Sub DTSource()
  297. MSFlex.Redraw = True
  298. 'MSFlex.Clear
  299. 'MSFlex.Rows = 1
  300. Data1.Refresh ' = "Customers"
  301. MSFlex.Refresh
  302. End Sub
  303. Public Sub Invoice()
  304. MSFlex.Clear
  305. MSFlex.Rows = 10
  306. MSFlex.Cols = 4
  307. MSFlex.ColWidth(0) = 2100
  308. MSFlex.TextMatrix(0, 0) = "Product"
  309. MSFlex.ColAlignment(0) = 1
  310. MSFlex.ColWidth(1) = 1600
  311. MSFlex.ColAlignment(1) = 6
  312. MSFlex.TextMatrix(0, 1) = "Units"
  313. MSFlex.ColAlignment(2) = 6
  314. MSFlex.ColWidth(2) = 1700
  315. MSFlex.TextMatrix(0, 2) = "Price"
  316. MSFlex.ColAlignment(3) = 6
  317. MSFlex.ColWidth(1) = 1100
  318. MSFlex.TextMatrix(0, 3) = "Total"
  319. MSFlex.RowHeight(2) = 400
  320. MSFlex.RowHeight(1) = 1100
  321. MSFlex.TextMatrix(1, 0) = "RobOPrintVB5.Ocx Demo"
  322. MSFlex.Col = 0
  323. MSFlex.Row = 1
  324. MSFlex.CellBackColor = &HFFFF&
  325. MSFlex.CellFontSize = 12
  326. MSFlex.TextMatrix(2, 0) = "Sample Project"
  327. MSFlex.TextMatrix(3, 0) = "MsFlexSample Form"
  328. MSFlex.TextMatrix(4, 0) = "Sample Project"
  329. MSFlex.TextMatrix(1, 1) = "1.00"
  330. MSFlex.TextMatrix(1, 2) = "0.00"
  331. MSFlex.TextMatrix(1, 3) = "0.00"
  332. MSFlex.TextMatrix(2, 1) = "1.00"
  333. MSFlex.TextMatrix(2, 2) = "0.00"
  334. MSFlex.TextMatrix(2, 3) = "0.00"
  335. MSFlex.TextMatrix(3, 1) = "1.00"
  336. MSFlex.TextMatrix(3, 2) = "0.00"
  337. MSFlex.TextMatrix(3, 3) = "0.00"
  338. MSFlex.TextMatrix(4, 1) = "1.00"
  339. MSFlex.TextMatrix(4, 2) = "0.00"
  340. MSFlex.TextMatrix(4, 3) = "0.00"
  341. MSFlex.TextMatrix(5, 0) = "Sample MdiForm"
  342. MSFlex.TextMatrix(5, 1) = "1.00"
  343. MSFlex.TextMatrix(5, 2) = "0.00"
  344. MSFlex.TextMatrix(5, 3) = "0.00"
  345. End Sub
  346. Private Sub Picture1_Click()
  347. Invoice
  348. End Sub
  349.